using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace IUPUI.StellarResults
{
	/// <summary>
	/// Represents an astronomical position.
	/// </summary>
	[Serializable]
	[TypeConverter(typeof(ExpandableObjectConverter))]
	public class Position : ININ.Xml.Serialization.XmlSerializationBase
	{
		#region Private Properties
		private double m_Declination;
		private double m_RightAscension;
		#endregion Private Properties

		#region Public Properties
		/// <summary>
		/// Gets or sets the declination, or degrees per hour that the position changes.
		/// </summary>
		/// <remarks>This value can be negative.</remarks>
		/// <value>The declination.</value>
		[Category("Position")]
		[Description("Gets or sets the declination, or degrees per hour that the position changes.")]
		public double Declination
		{
			get
			{
				return m_Declination;
			}
			set
			{
				m_Declination = value;
			}
		}

		/// <summary>
		/// Gets or sets the right ascension. (0 - 360 degrees)
		/// </summary>
		/// <value>The RightAscension.</value>
		[Category("Position")]
		[Description("Gets or sets the right ascension. (0 - 360 degrees)")]
		public double RightAscension
		{
			get
			{
				return m_RightAscension;
			}
			set
			{
				m_RightAscension = value;
			}
		}
		#endregion Public Properties

		#region Constructors
		/// <summary>
		/// Initializes a new instance of the <see cref="Position"/> class.
		/// </summary>
		public Position()
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="Position"/> class.
		/// </summary>
		/// <param name="declination">The declination.</param>
		/// <param name="rightAscension">The right ascension.</param>
		public Position(
			double declination,
			double rightAscension)
		{
			m_Declination = declination;
			m_RightAscension = rightAscension;
		}
		#endregion Constructors

		#region Overrides
		/// <summary>
		/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
		/// </summary>
		/// <returns>
		/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
		/// </returns>
		/// <filterPriority>2</filterPriority>
		public override string ToString()
		{
			return String.Format("{0}, {1}",
				m_Declination,
				m_RightAscension);
		}
		#endregion Overrides
	}
}
